import Vue from 'vue'
import App from './App.vue'

Vue.directive('permission', {
  inserted(el, binding) {
    const allowedUsers = ['admin', 'zhangsan', 'lisi'];
    const userRole = binding.value; // 获取传递给指令的值
    if (!allowedUsers.includes(userRole)) {
      el.parentNode && el.parentNode.removeChild(el);
    }
  }
});
Vue.config.productionTip = false



new Vue({
  render: h => h(App),
}).$mount('#app')
